package ruler.rules;

import java.util.HashMap;

import android.os.Parcel;

public abstract class composedRule extends Rule {
	protected Rule r1;
	protected Rule r2;
	
	public composedRule(){}	
	public composedRule(String n, Rule a, Rule b){
		super(n);
		this.r1=a;
		this.r2=b;
	}	
	
	public composedRule(int id, String name, String description,
			DEVICE_TYPE device_type, RULE_TYPE rule_type, String packageName,
			boolean whenRunning, boolean enable_device, Rule a, Rule b) {
		super(id, name, description, device_type, rule_type, packageName, whenRunning, enable_device);
		this.r1=a;
		this.r2=b;
	}
	
	public Rule getR1(){
		return this.r1;
	}
	
	public void setR1(Rule a){
		this.r1=a;
	}
	
	public Rule getR2(){
		return this.r2;
	}
	
	public void setR2(Rule b){
		this.r2=b;
	}	
		
	public composedRule(Parcel in) {
		super(in);
	}
	
	public abstract boolean isValid(HashMap<String, RULE_TYPE> hasMap);
}
